package com.class04.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @ClassDescription:
 * 初始化类
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2023/12/4 8:16
 */
public class SpringMVCInit extends AbstractAnnotationConfigDispatcherServletInitializer {

    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[0];
    }

    @Override//springmvc需要的组件的配置类
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{MvcConfig.class};
    }

    @Override//servlet DispatcherServlet
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
